package com.chee.plant.hibernate.object.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the plant_fruit table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="plant_fruit"
 */

public abstract class BasePlantFruit  implements Serializable {

	public static String REF = "PlantFruit";
	public static String PROP_EAT_LEVEL = "EatLevel";
	public static String PROP_EAT_ATTACK = "EatAttack";
	public static String PROP_NPC_SELL = "NpcSell";
	public static String PROP_EAT_DEFENSE = "EatDefense";
	public static String PROP_PRICE = "Price";
	public static String PROP_ID = "Id";
	public static String PROP_EAT_LIFE = "EatLife";
	public static String PROP_EAT_INTERVAL = "EatInterval";
	public static String PROP_PLANT_ID = "PlantId";


	// constructors
	public BasePlantFruit () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BasePlantFruit (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BasePlantFruit (
		java.lang.Integer id,
		java.lang.Integer plantId,
		java.lang.Integer price,
		java.lang.Integer npcSell,
		java.lang.Integer eatLevel,
		java.lang.Integer eatInterval,
		java.lang.Integer eatAttack,
		java.lang.Integer eatDefense,
		java.lang.Integer eatLife) {

		this.setId(id);
		this.setPlantId(plantId);
		this.setPrice(price);
		this.setNpcSell(npcSell);
		this.setEatLevel(eatLevel);
		this.setEatInterval(eatInterval);
		this.setEatAttack(eatAttack);
		this.setEatDefense(eatDefense);
		this.setEatLife(eatLife);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer plantId;
	private java.lang.Integer price;
	private java.lang.Integer npcSell;
	private java.lang.Integer eatLevel;
	private java.lang.Integer eatInterval;
	private java.lang.Integer eatAttack;
	private java.lang.Integer eatDefense;
	private java.lang.Integer eatLife;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: plant_id
	 */
	public java.lang.Integer getPlantId () {
		return plantId;
	}

	/**
	 * Set the value related to the column: plant_id
	 * @param plantId the plant_id value
	 */
	public void setPlantId (java.lang.Integer plantId) {
		this.plantId = plantId;
	}



	/**
	 * Return the value associated with the column: price
	 */
	public java.lang.Integer getPrice () {
		return price;
	}

	/**
	 * Set the value related to the column: price
	 * @param price the price value
	 */
	public void setPrice (java.lang.Integer price) {
		this.price = price;
	}



	/**
	 * Return the value associated with the column: npc_sell
	 */
	public java.lang.Integer getNpcSell () {
		return npcSell;
	}

	/**
	 * Set the value related to the column: npc_sell
	 * @param npcSell the npc_sell value
	 */
	public void setNpcSell (java.lang.Integer npcSell) {
		this.npcSell = npcSell;
	}



	/**
	 * Return the value associated with the column: eat_level
	 */
	public java.lang.Integer getEatLevel () {
		return eatLevel;
	}

	/**
	 * Set the value related to the column: eat_level
	 * @param eatLevel the eat_level value
	 */
	public void setEatLevel (java.lang.Integer eatLevel) {
		this.eatLevel = eatLevel;
	}



	/**
	 * Return the value associated with the column: eat_interval
	 */
	public java.lang.Integer getEatInterval () {
		return eatInterval;
	}

	/**
	 * Set the value related to the column: eat_interval
	 * @param eatInterval the eat_interval value
	 */
	public void setEatInterval (java.lang.Integer eatInterval) {
		this.eatInterval = eatInterval;
	}



	/**
	 * Return the value associated with the column: eat_attack
	 */
	public java.lang.Integer getEatAttack () {
		return eatAttack;
	}

	/**
	 * Set the value related to the column: eat_attack
	 * @param eatAttack the eat_attack value
	 */
	public void setEatAttack (java.lang.Integer eatAttack) {
		this.eatAttack = eatAttack;
	}



	/**
	 * Return the value associated with the column: eat_defense
	 */
	public java.lang.Integer getEatDefense () {
		return eatDefense;
	}

	/**
	 * Set the value related to the column: eat_defense
	 * @param eatDefense the eat_defense value
	 */
	public void setEatDefense (java.lang.Integer eatDefense) {
		this.eatDefense = eatDefense;
	}



	/**
	 * Return the value associated with the column: eat_life
	 */
	public java.lang.Integer getEatLife () {
		return eatLife;
	}

	/**
	 * Set the value related to the column: eat_life
	 * @param eatLife the eat_life value
	 */
	public void setEatLife (java.lang.Integer eatLife) {
		this.eatLife = eatLife;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.chee.plant.hibernate.object.PlantFruit)) return false;
		else {
			com.chee.plant.hibernate.object.PlantFruit plantFruit = (com.chee.plant.hibernate.object.PlantFruit) obj;
			if (null == this.getId() || null == plantFruit.getId()) return false;
			else return (this.getId().equals(plantFruit.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

private static final long serialVersionUID = 1L; 
}